<script setup>
import { ref } from "vue";

const show = ref(true)
</script>

<template>
  <button @click="show = !show">Toggle</button>
  <!-- <Transition>
    <div v-if="show">hello</div>
  </Transition> -->
  <Transition name="bounce">
    <div v-if="show" style="text-align: center;">hello</div>
  </Transition>
</template>

<style>
/* .v-enter-active {
  transition: all 0.3s ease-out;
}
.v-leave-active {
  transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}

.v-enter-from,
.v-leave-to {
  transform: translateX(20px);
  opacity: 0;
} */

.bounce-enter-active {
  animation: bounce-in 0.5s;
}
.bounce-leave-active {
  animation: bounce-in 0.5s reverse;
}

@keyframes bounce-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
</style>